//
//  SMSCode.m
//  meishangBusiness
//
//  Created by Rui on 15/2/28.
//  Copyright (c) 2015年 xingheng. All rights reserved.
//

#import "SMSCode.h"

@implementation SMSCode

/**
 *  发送短息获取验证码
 *
 *  @param mobile    手机号码
 *  @param smsCode   验证码
 *  @param success   成功回调
 *  @param failure   失败回调
 */
+(void)SendSMSGetCode:(NSString*)mobile
              smsCode:(NSInteger)smsCode
              success:(void(^)(id responseDic))success
              failure:(void(^)(NSError *error))failure
{
    //短信内容
    NSString *smsContent = [NSString stringWithFormat:@"尊敬的用户您好，您的验证码为：%ld【美檬】",(long)smsCode];
    
    NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
                            ksmskey,@"apikey",
                            ksmsusername,@"username",
                            ksmspassword,@"password",
                            mobile,@"mobile",
                            smsContent,@"content",
                            nil];
    [HttpHelper HttpPostRequest:ksmsSendurl parameters:params success:success failure:failure];
}

@end